<!-- 
  * Copyright (c) 2022 iSoftStone Information Technology (Group) Co.,Ltd.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
 -->
<template>
	<view>
		<view class="box-top">
			<text>{{data.title}}</text>
			<u-image :showLoading="true" :src="lablesrc" width="36rpx" height="28rpx"></u-image>
			<text class="p">+{{data.jf}}积分</text>
		</view>
		<view class="boxContent">
			<view class="left">
				<u-text margin="12rpx 0" size="24rpx" color="rgba(0,0,0,0.5)" :text="data.txt"></u-text>
				<u-slider v-if="data.slisder" block-width="10" disabled activeColor="#F1831C" v-model="data.value"
					:min="data.min" :max="data.max"></u-slider>
			</view>
			<view class="right">
				<u-button v-if="type==='3'" open-type="share" :type="data.btnType?'warning':'info'" size="small"
					:text="data.lable" shape="circle" @click="toSignPage()"></u-button>
				<u-button v-if="type!=='3'" :type="data.btnType?'warning':'info'" size="small" :text="data.lable"
					shape="circle" @click="toSignPage()"></u-button>
				<u-text v-if="data.slisder" align="center" size="24rpx" color="rgba(0,0,0,0.5)" :text="data.allDay">
				</u-text>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		props: {
			data: Object,
			type: String
		},
		data() {
			return {
				lablesrc: this.$store.state.baseurl + 'static/image/j1.png',
			}
		},
		computed: {

		},
		methods: {
			toSignPage() {
				if (this.data.btnType) {
					this.$emit("change", this.type)
				}
			}
		}
	}
</script>
<style>

</style>
<style lang="scss" scoped>
	.box-top {
		flex-direction: row;
		flex-wrap: wrap;
		display: flex;
		color: #000000;
		font-size: 32rpx;
		line-height: 50rpx;

		.p {
			color: #F1831C;
			font-size: 24rpx;
		}
	}

	.boxContent {
		flex-direction: row;
		flex-wrap: wrap;
		display: flex;

		.right {
			justify-content: flex-end;
			position: absolute;
			top: 0;
			right: 0;
		}

		.left {
			width: 465rpx;
		}
	}
</style>
<style lang="scss">
	.box {
		.u-image {
			position: relative;
			top: 5px;
			margin: 0 5px;
		}
	}

	slider {
		margin: 0;
	}
</style>
